<?php
    function fwiki_entry($p) {
        if (($f = fopen("pages/".$p.".txt", "r")) == false) {
            echo "Page with title <strong>".$p."</strong> doesn't exist! <a href=\"javascript:;\" onclick=\"create_page('".htmlspecialchars($p)."');\">Click here</a> to create it!";
            return;
        }
        while(!feof($f)) {
            echo fgets($f);
        }
        fclose($f);
    }
?>
